<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2016/6/19 0019
 * Time: 下午 9:52
 */

namespace backend\controllers;

use Yii;
use yii\web\Controller;
use backend\controllers\BackendController;

class DefaultController extends BackendController
{
    public $layout = false;
    
    public $defaultAction = 'index';
    
    public function actionIndex(){
        return $this->render('index');
    }
    
    public function actionCreatepermission(){
        $auth = Yii::$app->authManager;
        $permission = $auth->createPermission('default/index');
        $permission->description = "欢迎页";
        var_dump($auth->add($permission));
    }
    
    public function actionWelcome(){
        return $this->render('welcome');
    }


}